|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectagents.anac.y2011.TheNegotiator.BidsCollection
public class BidsCollection
The BidsCollection class stores the bids of the partner and all possible bids.
| Constructor Summary | |
|---|---|
BidsCollection()
Creates a BidsCollection-object which stores the partner bids and all possible bids. |
|
| Method Summary | |
|---|---|
void |
addPartnerBid(Bid bid,
double utility,
double time)
Add a partner bid to the history. |
void |
addPossibleBid(Bid bid,
double utility)
Add a possible bid to the list of possible bids. |
Bid |
getBestPartnerBids(double threshold)
Get a partner bid which has a utility of at least a certain value. |
Bid |
getOwnBidBetween(double lowerThres,
double upperThres)
|
Bid |
getOwnBidBetween(double lowerThres,
double upperThres,
int counter)
Get a random bid between two given thresholds. |
Bid |
getPartnerBid(int i)
Get a partner bid. |
java.util.ArrayList<BidDetails> |
getPartnerBids()
|
java.util.ArrayList<BidDetails> |
getPossibleBids()
|
double |
getUpperThreshold(double threshold,
double percentage)
Calculate the upperthreshold based on the lowerthreshold and a given percentage. |
void |
sortPossibleBids()
Sorts all possible bids in reverse natural order. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BidsCollection()
| Method Detail |
|---|
public java.util.ArrayList<BidDetails> getPartnerBids()
public java.util.ArrayList<BidDetails> getPossibleBids()
public void addPartnerBid(Bid bid,
double utility,
double time)
bid - made by partner in the current turnutility - of the bid
public void addPossibleBid(Bid bid,
double utility)
bid - which is possibleutility - of the bidpublic void sortPossibleBids()
public Bid getPartnerBid(int i)
i -
public Bid getBestPartnerBids(double threshold)
threshold -
public Bid getOwnBidBetween(double lowerThres,
double upperThres)
public Bid getOwnBidBetween(double lowerThres,
double upperThres,
int counter)
lowerThres - lowerbound thresholdupperThres - upperbound threshold
public double getUpperThreshold(double threshold,
double percentage)
threshold - percentage -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||